<?php 
require_once('../db/connect.php'); 
$menuVertical = $_POST['menuVertical'];
$opcion = $_POST['opcion'];

//┌─────────────────┐
//Si viene vacio
if($menuVertical == ''){
?>
    <select disabled="disabled">
    <option>Seleccione</option>
    </select>
<?php 
return;
}
//└─────────────────┘

mysql_select_db($database_victoria, $victoria );
$query_rsListar = "
SELECT 
  PRO_CODIGO,
  PRO_NOMBRE_OPCION 
FROM
  programa 
WHERE PRO_UBICACION = 'Vertical' 
  AND PRO_TIPO = 'submenu' 
  AND PRO_ESTADO = 1 
AND PRO_PADRE = ".$menuVertical."  
ORDER BY PRO_NOMBRE_OPCION 
";
$rsListar = mysql_query($query_rsListar, $victoria );
?>
	<select class=" validar " name="Submenu" id="Submenu" >
		<option value="">Seleccione</option>		
		<?php 
		while($row_rsListar = mysql_fetch_assoc($rsListar)){
			$selected = ($opcion == $row_rsListar['PRO_CODIGO'] ? 'selected="selected"' : '' );     
		?>
		<option <?php echo $selected?>  value="<?php echo $row_rsListar['PRO_CODIGO'];?>"><?php echo $row_rsListar['PRO_NOMBRE_OPCION'];?></option>
		<?php }?>
	</select>
   
    